#ifndef OSCILLATOR_H
#define OSCILLATOR_H

#include <QObject>
#include "aiprocessor.h"

class Oscillator : public QObject, public AIProcessor
{
    Q_OBJECT
    friend class Engine;
public:
    explicit Oscillator(QObject * parent=0);
    void setFreq(float f){freq = f;}
    void process();
    void setData(PData data){
        data_ = data;
    }
protected:
    float freq;
    float curPhase;
    float vol;
private:
    PData data_;
public slots:
    void changeFreq(float f){setFreq(f);}
    void changeVolume(float v){vol = v;}

};

#endif // OSCILLATOR_H
